<!--

/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* brief description of file
*
* @author      Tom Murtagh
* @author      Kim Jackson
* @author      Ian Johnson   <ian.johnson@sydney.edu.au>
* @author      Stephen White   <stephen.white@sydney.edu.au>
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/

-->
<!--

/**
 * editSysIdentificationAdvanced.html, T1000 template for editing the email and locations section of the system identification record
 * defining email server and addresses for incoming and outgoing mail
 * Ian Johnson 12 aug 2011
 * @copyright (C) 2005-2010 University of Sydney Digital Innovation Unit.
 * @link: http://HeuristScholar.org
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 * @package Heurist academic knowledge management system
 * @todo
 **/

-->
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Database Advanced Properties</title>
    <link rel="stylesheet" type="text/css" href="../../common/css/global.css">
    <link rel="stylesheet" type="text/css" href="../../common/css/edit.css">
    <link rel="stylesheet" type="text/css" href="../../common/css/admin.css">
 </head>

 <body class="popup" onload="showMessage()">
<script type="text/javascript" src="../../common/js/utilsLoad.js"></script>
<script type="text/javascript" src="../../common/js/utilsUI.js"></script>
<script>
	// quite weird way - since it is not possibel (or unknown) how to treat t1000 in case of error
 	function showMessage(){
 		var is_processed = top.HEURIST.util.getUrlParameter('was', this.location.search);
 		if(document.getElementById('divErrors').innerHTML=="" && is_processed){
			top.HEURIST.util.popupTinyElement(this, document.getElementById('divMessage'));
			setTimeout(function(){
				top.HEURIST.util.closePopupLast();
			}, 500);
		}

		if([popup!]=='1' || [popup!]=='2'){
			document.getElementById('headertitle').style.display = "none";
			document.getElementById('btnBackToImport').style.visibility = "visible";
		}

	}

	function backToImport() {
		if([popup!]=='1'){
			window.location.href = '../../import/fieldhelper/synchroniseWithFieldHelper.php';
		}else{
			window.location.href = '../../import/email/emailProcessingSetup.php';
		}
	}
</script>

<div id="headertitle" class="banner"><h2>Database Advanced Properties</h2></div>

  <!--{PageHeader} -->

 <div id="page-inner">

 <div id="divErrors">[errors]</div>


[foreach SYSID sys]

<form action="editSysIdentificationAdvanced.php?was=1&amp;db=[dbname!]&amp;popup=[popup!]" method="post">

[update SYSID sysid_update]



<h3>Advanced Properties</h3>

<div class="input-row">
<div class="input-header-cell">Heurist registration number (0 = not registered) and database version</div>
<div class="input-cell">Registration number <b>[sys_dbRegisteredID]</b>&nbsp;&nbsp;&nbsp;DB version <b>[sys_dbVersion].[sys_dbSubVersion].[sys_dbSubSubVersion]</b></div>
</div>

<h3>Incoming / outgoing email</h3>
<div class="input-row">
<div class="input-header-cell">IMAP server for server receiving emails which can be harvested</div>
<div class="input-cell">[textbox : sys_eMailImapServer : : size=30]
Port [textbox : sys_eMailImapPort : : size=4] Protocol [textbox : sys_eMailImapProtocol : : size=10]</div>
</div>
<div class="input-row">
<div class="input-header-cell">IMAP user name / password for incoming mail  </div>
<div class="input-cell">[textbox : sys_eMailImapUsername : : size=30] / [textbox : sys_eMailImapPassword : : size=30]</div>
</div>
<div class="input-row">
<div class="input-header-cell">Addresses from which incoming mail to be harvested may be received  </div>
<div class="input-cell">[textbox : sys_IncomingEmailAddresses : : size=60] <br />comma separated, shared list, additional addresses can be added in personal profile, other addresses are ignored</div>
</div>
<div class="input-row">
<div class="input-header-cell">Potential email addresses to which database records may be sent  </div>
<div class="input-cell">[textbox : sys_TargetEmailAddresses : : size=60] <br />comma separated, shared list, will appear for every user, additional addresses can be added in personal profile</div>
</div>

<h3>Locations</h3>

<!--
<div class="input-row">
<div class="input-header-cell">Database containing the user authentication table (sysUGrps) </div>
<div class="input-cell">[textbox : sys_UGrpsDatabase : : size=30] blank = current database</div>
</div>

-->

<div class="input-row">
<div class="input-header-cell">Directory in which to write HTML representation of published records  </div>
<div class="input-cell">[textbox : sys_htmlOutputDirectory : : size=140] <br />full path, blank = default directory</div>
</div>
<div class="input-row">
<div class="input-header-cell">Directory in which to write HML representation of published records  </div>
<div class="input-cell">[textbox : sys_hmlOutputDirectory : : size=140]  <br />full path, blank = default directory </div>
</div>
<div class="input-row">
<div class="input-header-cell">Additional folder(s) containing files for indexing (Picasa/FieldHelper compatibility)  </div>
<div class="input-cell">[textbox : sys_MediaFolders : : size=140] <br />separated by semi-colon ( ; ), child folders are included automatically</div>
</div>
<div class="input-row">
<div class="input-header-cell">File extensions to index (comma-separatd list)  </div>
<div class="input-cell">[textbox : sys_MediaExtensions : : size=140] <br />(comma separated)</div>
</div>

<div class="input-row">
<div class="input-header-cell">Default constraints behaviour (advanced)  </div>
<div class="input-cell">[dropdown : sys_ConstraintDefaultBehavior : : enum("locktypetotype", "unconstrainedbydefault", "allownullwildcards")]
If in doubt, leave as 'locktypetotype'</div>
</div>

[end-update]


<p><span class="red">[errors]</span></p>

<input type="submit" value="save" />

<input type="button" id="btnBackToImport" style="visibility: hidden;" value="Back to import"
  onclick="{setTimeout(backToImport, 0);}"
 />

</form>

[end-foreach]

</div>

<div id="divMessage" style="display:none;width:180px;height:80px;text-align: center; ">
	<div id="divMessage-text" style="color:black;font-weight:bold;margin:10px;">Advanced Properties saved</div>
</div>

 </body>
</html>



